package com.rati.usercenter.exception;

import com.rati.usercenter.common.ErrorCode;

/**
 * 业务异常类
 *
 * @author Lwh
 * @time 2022/12/14 19:31
 */
public class BusinessException extends RuntimeException {

    private static final long serialVersionUID = 7871640534236280404L;

    private final ErrorCode errorCode;
    private final String description;

    public BusinessException(ErrorCode errorCode, String description) {
        this.errorCode = errorCode;
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public ErrorCode getErrorCode() {
        return errorCode;
    }
}
